package Experiment1;

/**
 * Created by zhangyunqi on 2017/9/26.
 */
import junit.framework.TestCase;

import java.util.LinkedList;


public class LinkedListTest extends TestCase {

    LinkedList list = new LinkedList ();

    public void testIsEmpty() {

        assertEquals ( true, list.isEmpty () );

        list.add ( "20162307" );

        assertEquals ( false, list.isEmpty () );

        list.remove ( "20162307" );

        assertEquals ( true, list.isEmpty () );

    }

    public void testAdd() {

        list.add ( "20162307张韵琪" );

        assertEquals ( "20162307张韵琪", list.get ( 0 ) );
    }


    public void testClear() {

        list.clear ();

        assertEquals ( 0, list.size () );

    }

}

